includeTargets << griffonScript("Init")

includeTargets << griffonScript("SetVersion")

target(upVersion: "The description of the script goes here!") {
    // TODO: Implement script here
    args = []
    def props = new Properties()
    props.load(new File("application.properties").newInputStream())
    def nowVersion = props["app.version"]
    
    (nowVersion =~ /(\d+)\.(\d+)/).each{ all, version, revision ->
        args << (version + "." + (revision.toInteger() + 1))
    }
    assert args.size() > 0
    setVersion()
}

setDefaultTarget(upVersion)
